package com.iplant.basic.service.basicenum.bfc;


import com.iplant.base.po.enums.BaseEnum;

public enum BFCMessageStatus implements BaseEnum {
	/**
	 * 默认 未读
	 */
	Default(0, "默认"),

	/**
	 * 已发送
	 */
	Sent(1, "已发送"),
	/**
	 * /** 已完成
	 */
	Read(2, " 已读"),

	Finished(3, " 已处理"),

	Close(4, " 已关闭");

	private int value;
	private String label;
	private String remark = "";

	private BFCMessageStatus(int value, String label) {
		this.value = value;
		this.label = label;
	}

	private BFCMessageStatus(int value, String label, String remark) {
		this.value = value;
		this.label = label;
		this.remark = remark;
	}

	/**
	 * 通过 value 的数值获取枚举实例
	 *
	 * @param val
	 * @return
	 */
	public static BFCMessageStatus getEnumType(int val) {
		for (BFCMessageStatus type : BFCMessageStatus.values()) {
			if (type.getValue() == val) {
				return type;
			}
		}
		return Default;
	}

	@Override
	public int getValue() {
		return value;
	}

	@Override
	public void setValue(int value) {
		this.value = value;
	}

	@Override
	public String getLabel() {
		return label;
	}

	@Override
	public void setLabel(String label) {
		this.label = label;
	}

	@Override
	public String getRemark() {
		return remark;
	}

	@Override
	public void setRemark(String remark) {
		this.remark = remark;
	}
}
